<script type="text/javascript">
$j = jQuery.noConflict();
//$j("#dialog:ui-dialog" ).dialog( "destroy" );
$j("#dialog-form" ).dialog({
	autoOpen: true,
	height: 250,
	width: 350,
	modal: false,
	zIndex: 1050,
	buttons: {
		"Ir Hasta": function(){
			$j("#errorRouting").html("");
			$j("#directivas").html("");
			cGeoController.getPointFromAddress($j("#dirDestino").val(),null);
		},
		Cancel: function(){
			$j( this ).dialog( "close" );
		}
	},
	close: function(){
		$j(".ui-dialog div" ).remove();
		//$j(this).dialog( "destroy" );
	}
}).dialogExtend({
	"maximize" : true,
	"minimize" : true,
	"dblclick" : "minimize"
	/*"icons" : {
	  "maximize" : "ui-icon-circle-plus",
	  "minimize" : "ui-icon-circle-minus",
	  "restore"  : "ui-icon-pause"
		}*/
	});
$j("#dirDestino").css("width","240px");
$j("#dirDestino").focus();
function pointFromAddressOk(p){
	$j("#errorRouting").hide();
	var lonlat = new OpenLayers.LonLat(parseFloat(p[0]),parseFloat(p[1])).transform(cMapController.getMapActive().getDisplayProjection(), cMapController.getMapActive().getProjection());
	cMapController.getMapActive().rutaAddVerticeIniFin(lonlat);
}
function pointFromAddressError(msg){
	$j("#errorRouting").html(msg);
	$j("#errorRouting").show();
}
</script>
<div id="dialog-form" title="Ruta hasta direccion de destino">
	<fieldset>
	<legend align="right">Direccion Destino</legend>
		<div id="movilData" style="font-size:12px;">
			<span>Cuenta: </span><span id="movilDescrip"></span><br />
			Ubicaci&oacute;n: <span id="movilAproxUbicacion"></span>
		</div>
		Ir hasta: <input type="text" name="dirDestino" id="dirDestino" value="" />
		<span style="font-size:9px;color:LightSlateGray;margin:left:20px;">(calle altura, ciudad, pais)</span>
	</fieldset>
	<div id="errorRouting" style="color: red;he"></div>
	<div id="directivas" style=""></div>
</div>